#include <bits/stdc++.h>
using namespace std;
struct node { int a;
    node():a{100} {
        cout << " default constructor " <<endl;
    }
    node(int a):a{a} {
        cout << "int constructor " <<endl;
        //cout << "a = " << a << endl;
    }

    //node( node &&  ) = default;

    node(const node &){
        cout << "copy constructor !" <<endl;
    }

    node & operator=(const node &t){
        cout << "assignment constructor" << endl;
        //this->a = t.a+1;
        return *this;
    }
    //node & operator=(node &&) = delete; // 不允许 move assignment 
};

node func(){
    node t;
    return t;
}

int main(){
    cout << "1===" << endl;
    node a;  //default constructor
    node b = a; //equ=>  node b(a) copy constructor
    node c(a); //copy constructor
    c = b ; // assignment constructor

    cout << "2=====" << endl;
    node a1 = func(); // equ => node a1(func()) : default constructor
    node a2 (func()); // default constructor
    a2 = func(); // default constructor  -- assignment constructor


    return 0;
}
